<!DOCTYPE html>
<!-- 表示使用Thymeleaf模板 -->
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>My Pet</title>
</head>
<body>
<span th:text="${pet.nickname}"></span>是我最喜欢的宠物！
<span>它今年已经</span><p th:text="${pet.age}"></p>岁啦！

<p th:if="${pet.hairColor} == '灰色'">稀有品种</p>
<p th:if="${pet.hairColor} == '棕色'">普通品种</p>
<span th:unless="${pet.age} > 7">年轻的宠物狗</span>
</body>
</html>